﻿@{
    ViewBag.Title = "AuditForm";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    var keyValue = request('keyValue');
    $(function () {

    })
    function AcceptClick() {
        if ($("#State").val() == 0) {
            top.dialogTop('未选择审核意见！', 'error');
            return false;
        }
        if ($("#State").val() == 3 && $("#AuditMemo").val() == "") {
            top.dialogTop('不同意需说明原因！', 'error');
            return false;
        }
        var postData = $("#form1").GetWebControls();
        $.ConfirmAjax({
            msg: "注：您确认要进行此操作吗？",
            url: "../../ResourceManage/RS_ProductIn/SaveForm?keyValue=" + keyValue,
            param: { queryJson: JSON.stringify(postData) },
            success: function (data) {
                $.currentIframe().$("#gridTable").trigger("reloadGrid");
                dialogClose()
            }
        });
    }
    function Avdit(s) {
        $("#State").val(s);
        if (s == 3) {
            $("#IsAudit").val(2);
        }
        else if (s == 2)
            $("#IsAudit").val(1);
    }
</script>
<style>
    input[type="radio"] + label::before {
        content: "\a0"; /*不换行空格*/
        display: inline-block;
        vertical-align: middle;
        font-size: 18px;
        width: 1em;
        height: 1em;
        margin-right: .4em;
        border-radius: 50%;
        border: 1px solid #01cd78;
        text-indent: .15em;
        line-height: 1;
    }

    input[type="radio"]:checked + label::before {
        background-color: #01cd78;
        background-clip: content-box;
        padding: .2em;
    }

    input[type="radio"] {
        position: absolute;
        clip: rect(0, 0, 0, 0);
    }
</style>
<div style="width:90%; margin-top:0px;">
    <table class="form" id="Aiditform" style="margin:0px auto;">
        <tr>
            <td class="formTitle" style="height: 37px;">审核意见</td>
            <td class="formValue" colspan="3">
                <input id="IsAudit" class="form-control" type="hidden" value="1" />
                <input type="radio" id="female" checked onclick="Avdit(2)" name="Audit" />
                <label for="female">同意</label>&nbsp;&nbsp;
                <input type="radio" id="male" onclick="Avdit(3)" name="Audit" />
                <label for="male">不同意</label>
            </td>
        </tr>
        <tr>
            <td class="formTitle" style="height: 37px;"> 审核人</td>
            <td class="formValue" colspan="3">
                <input id="State" class="form-control" type="hidden" value="2" />
                <input id="AuditUserId" class="form-control" type="hidden" value="@LeSoft.Application.Code.OperatorProvider.Provider.Current().UserId" />
                <input id="AuditUserName" type="text" class="form-control" readonly value="@LeSoft.Application.Code.OperatorProvider.Provider.Current().UserName" />
            </td>
        </tr>
        <tr>
            <td class="formTitle" style="height: 37px;"> 审核时间</td>
            <td class="formValue" colspan="3">
                <input id="AuditDate" type="text" readonly value="@LeSoft.Util.Time.GetToday()" class="form-control input-wdatepicker" onfocus="WdatePicker({maxDate:'%y-%M-%d'})" isvalid="yes" checkexpession="NotNull" />

            </td>
        </tr>
        <tr>
            <td class="formTitle" style="height: 37px;"> 审核说明</td>
            <td class="formValue" colspan="3">
                <textarea id="AuditMemo" class="form-control" style="height: 100px;"></textarea>
            </td>
        </tr>
    </table>
</div>
